export function fontSize(res) {
  let clientWidth = document.documentElement.clientWidth;
  if (!clientWidth) return;
  let fontSize = clientWidth / 1280;
  return res * fontSize;
}
export const defaultColor = [
  "#c23531",
  "#2f4554",
  "#61a0a8",
  "#d48265",
  "#91c7ae",
  "#749f83",
  "#ca8622",
  "#bda29a",
];
export const group = (array = [], subGroupLength = 0) => {
  let index = 0;
  const newArray = [];
  while (index < array.length) {
    newArray.push(array.slice(index, (index += subGroupLength)));
  }
  return newArray;
};
